package com.yict.csms.system.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 汇率设置表Entity
 * @author ryan.wang
 *
 */
@Entity
@Table(name = "CSMS_EXCHANGE_RATE")
public class ExchangeRate {
	
	@Id
	@Column(name = "EXRATEID")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "csms_exchangeRate_seq")
	@SequenceGenerator(name = "csms_exchangeRate_seq", sequenceName = "SEQ_CSMS_EXCHANGERATE", allocationSize = 1, initialValue = 1)
	private Long exRateId;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FROMCURRENCY")
	private DataDict fromCurrency;
	
	@Column(name = "RATE")
	private float rate;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TOCURRENCY")
	private DataDict toCurrency;
	
	@Column(name = "BEGINDATE")
	private Date beginDate;
	
	@Column(name = "ENDDATE")
	private Date endDate;
	
	@Column(name = "REMARKS")
	private String remarks;
	
	@Column(name = "CREATEDATE")
	private Date createDate;

	@Column(name = "UPDATEDATE")
	private Date updateDate;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATEPERSON")
	private User createPerson;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "UPDATEPERSON")
	private User updatePerson;

	public Long getExRateId() {
		return exRateId;
	}

	public void setExRateId(Long exRateId) {
		this.exRateId = exRateId;
	}

	public DataDict getFromCurrency() {
		return fromCurrency;
	}

	public void setFromCurrency(DataDict fromCurrency) {
		this.fromCurrency = fromCurrency;
	}

	public float getRate() {
		return rate;
	}

	public void setRate(float rate) {
		this.rate = rate;
	}

	public DataDict getToCurrency() {
		return toCurrency;
	}

	public void setToCurrency(DataDict toCurrency) {
		this.toCurrency = toCurrency;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public User getCreatePerson() {
		return createPerson;
	}

	public void setCreatePerson(User createPerson) {
		this.createPerson = createPerson;
	}

	public User getUpdatePerson() {
		return updatePerson;
	}

	public void setUpdatePerson(User updatePerson) {
		this.updatePerson = updatePerson;
	}

}
